#coding:utf-8
import requests

headers = {
            "Content-Type":"application/x-www-form-urlencoded;charset=utf-8",
            "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/40.0.2214.93 Safari/537.36"
            }
print "start"
payload = {"key1":"value1", "key2":"value2", "test1":"test2"}
#http://www.baidu.com/?test1=test2&key2=value2&key1=value1

r = requests.get("http://www.baidu.com", params=payload, headers=headers)

print "status: " ,r.status_code
print "encoding: " ,r.encoding
print "json: " ,r.json
print "url: ", r.url
print "raw:", r.raw
